// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource';
import $ from 'jquery'
var FastClick = require('fastclick');
import'../node_modules/jquery-weui/dist/lib/weui.css'
import'../node_modules/jquery-weui/dist/css/jquery-weui.min.css'
import'../node_modules/jquery-weui/dist/js/jquery-weui.min'
// Vue.use(jqueryWeui);
Vue.use(VueResource);
//弹框
import layer from 'vue-layer'
Vue.prototype.$layer = layer(Vue);
//ajax
Vue.http.options.emulateHTTP = true;

Vue.http.options.emulateJSON = true;
//viex
import store from './store'
Vue.config.productionTip = false;

// 判断是否登录
// router.beforeEach((to, from, next)=>{
//     console.log(store.state)
//
//   if(sessionStorage['user_id']&&to.meta.requiresAuth){
//       next('/login')
//   }else{
//       next()
//   }
//
// });

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    template: '<App/>',
    components: { App }
})
FastClick.attach(document.body)